/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mathma.discrete.pair;

import mathma.core.value.Value;
import mathma.core.value.ValueType;

import mathma.discrete.SymbolicValue;

/**
 * @since 0.2.2
 * @author Ethan Levine
 */
public class OrderedPair<T> extends Value<OrderedPair<T>> {

    private final SymbolicValue<T> firstObj;
    private final SymbolicValue<T> secondObj;

    public OrderedPair(T firstObj, T secondObj) {
        super (new ValueType<OrderedPair<T>>(
                new OrderedPairSimplifier<T>(), OrderedPair.class));
        this.firstObj = new SymbolicValue<T>(firstObj);
        this.secondObj = new SymbolicValue<T>(secondObj);
    }

    public OrderedPair(SymbolicValue<T> firstObj,
            SymbolicValue<T> secondObj) {
        super (new ValueType<OrderedPair<T>>(
                new OrderedPairSimplifier<T>(), OrderedPair.class));
        this.firstObj = firstObj;
        this.secondObj = secondObj;
    }

    public SymbolicValue<T> first() {
        return firstObj;
    }

    public SymbolicValue<T> second() {
        return secondObj;
    }
}
